//
//  YZAttDocInfoViewController.m
//  kuaiyi
//
//  Created by Liu on 16/5/5.
//
//

#import "YZAttDocInfoViewController.h"

#import "YZAttDocInfoView.h"
@interface YZAttDocInfoViewController ()

@property (nonatomic , strong)UILabel *titleView;

@property (nonatomic , strong)YZAttDocInfoView *AttDocInfoView;

@end

@implementation YZAttDocInfoViewController


-(void)loadView {
//    [super loadView];
    self.AttDocInfoView = [[YZAttDocInfoView alloc]init];
    self.view = self.AttDocInfoView;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.titleView = self.titleView;
    __weak YZAttDocInfoViewController *selfV = self;
    self.AttDocInfoView.DocInfoBlock = ^() {
        UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"医生关闭了咨询" preferredStyle:UIAlertControllerStyleAlert];
        [selfV presentViewController:alert animated:YES completion:nil];
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [selfV dismissViewControllerAnimated:YES completion:nil];
        });
    };
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - 懒加载
-(UILabel *)titleView {
    if (_titleView == nil) {
        _titleView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
        [_titleView setTextColor:[UIColor whiteColor]];
        [_titleView setText:@"医生基本信息"];
    }
    return _titleView;
}

@end
